3.46 \(\int \frac{(a+b x^2) \sin (c+d x)}{x^3} \, dx\)

Optimal. Leaf size=74 \[ -\frac{1}{2} a d^2 \sin (c) \text{CosIntegral}(d x)-\frac{1}{2} a d^2 \cos (c) \text{Si}(d x)-\frac{a \sin (c+d x)}{2 x^2}-\frac{a d \cos (c+d x)}{2 x}+b \sin (c) \text{CosIntegral}(d x)+b \cos (c) \text{Si}(d x) \]

[Out]

-(a*d*Cos[c + d*x])/(2*x) + b*CosIntegral[d*x]*Sin[c] - (a*d^2*CosIntegral[d*x]*Sin[c])/2 - (a*Sin[c + d*x])/(
2*x^2) + b*Cos[c]*SinIntegral[d*x] - (a*d^2*Cos[c]*SinIntegral[d*x])/2

________________________________________________________________________________________

Rubi [A]  time = 0.16056, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 5, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.294, Rules used = {3339, 3297, 3303, 3299, 3302} \[ -\frac{1}{2} a d^2 \sin (c) \text{CosIntegral}(d x)-\frac{1}{2} a d^2 \cos (c) \text{Si}(d x)-\frac{a \sin (c+d x)}{2 x^2}-\frac{a d \cos (c+d x)}{2 x}+b \sin (c) \text{CosIntegral}(d x)+b \cos (c) \text{Si}(d x) \]

Antiderivative was successfully verified.

[In]

Int[((a + b*x^2)*Sin[c + d*x])/x^3,x]

[Out]

-(a*d*Cos[c + d*x])/(2*x) + b*CosIntegral[d*x]*Sin[c] - (a*d^2*CosIntegral[d*x]*Sin[c])/2 - (a*Sin[c + d*x])/(
2*x^2) + b*Cos[c]*SinIntegral[d*x] - (a*d^2*Cos[c]*SinIntegral[d*x])/2

Rule 3339

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*Sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Int[ExpandIntegran
d[Sin[c + d*x], (e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rubi steps

\begin{align*} \int \frac{\left (a+b x^2\right ) \sin (c+d x)}{x^3} \, dx &=\int \left (\frac{a \sin (c+d x)}{x^3}+\frac{b \sin (c+d x)}{x}\right ) \, dx\\ &=a \int \frac{\sin (c+d x)}{x^3} \, dx+b \int \frac{\sin (c+d x)}{x} \, dx\\ &=-\frac{a \sin (c+d x)}{2 x^2}+\frac{1}{2} (a d) \int \frac{\cos (c+d x)}{x^2} \, dx+(b \cos (c)) \int \frac{\sin (d x)}{x} \, dx+(b \sin (c)) \int \frac{\cos (d x)}{x} \, dx\\ &=-\frac{a d \cos (c+d x)}{2 x}+b \text{Ci}(d x) \sin (c)-\frac{a \sin (c+d x)}{2 x^2}+b \cos (c) \text{Si}(d x)-\frac{1}{2} \left (a d^2\right ) \int \frac{\sin (c+d x)}{x} \, dx\\ &=-\frac{a d \cos (c+d x)}{2 x}+b \text{Ci}(d x) \sin (c)-\frac{a \sin (c+d x)}{2 x^2}+b \cos (c) \text{Si}(d x)-\frac{1}{2} \left (a d^2 \cos (c)\right ) \int \frac{\sin (d x)}{x} \, dx-\frac{1}{2} \left (a d^2 \sin (c)\right ) \int \frac{\cos (d x)}{x} \, dx\\ &=-\frac{a d \cos (c+d x)}{2 x}+b \text{Ci}(d x) \sin (c)-\frac{1}{2} a d^2 \text{Ci}(d x) \sin (c)-\frac{a \sin (c+d x)}{2 x^2}+b \cos (c) \text{Si}(d x)-\frac{1}{2} a d^2 \cos (c) \text{Si}(d x)\\ \end{align*}

Mathematica [A]  time = 0.186828, size = 82, normalized size = 1.11 \[ -\frac{1}{2} a d^2 (\sin (c) \text{CosIntegral}(d x)+\cos (c) \text{Si}(d x))-\frac{a \cos (d x) (d x \cos (c)+\sin (c))}{2 x^2}+\frac{a \sin (d x) (d x \sin (c)-\cos (c))}{2 x^2}+b \sin (c) \text{CosIntegral}(d x)+b \cos (c) \text{Si}(d x) \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x^2)*Sin[c + d*x])/x^3,x]

[Out]

b*CosIntegral[d*x]*Sin[c] - (a*Cos[d*x]*(d*x*Cos[c] + Sin[c]))/(2*x^2) + (a*(-Cos[c] + d*x*Sin[c])*Sin[d*x])/(
2*x^2) + b*Cos[c]*SinIntegral[d*x] - (a*d^2*(CosIntegral[d*x]*Sin[c] + Cos[c]*SinIntegral[d*x]))/2

________________________________________________________________________________________

Maple [A]  time = 0.013, size = 73, normalized size = 1. \begin{align*}{d}^{2} \left ({\frac{b \left ({\it Si} \left ( dx \right ) \cos \left ( c \right ) +{\it Ci} \left ( dx \right ) \sin \left ( c \right ) \right ) }{{d}^{2}}}+a \left ( -{\frac{\sin \left ( dx+c \right ) }{2\,{d}^{2}{x}^{2}}}-{\frac{\cos \left ( dx+c \right ) }{2\,dx}}-{\frac{{\it Si} \left ( dx \right ) \cos \left ( c \right ) }{2}}-{\frac{{\it Ci} \left ( dx \right ) \sin \left ( c \right ) }{2}} \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)*sin(d*x+c)/x^3,x)

[Out]

d^2*(1/d^2*b*(Si(d*x)*cos(c)+Ci(d*x)*sin(c))+a*(-1/2*sin(d*x+c)/x^2/d^2-1/2*cos(d*x+c)/x/d-1/2*Si(d*x)*cos(c)-
1/2*Ci(d*x)*sin(c)))

________________________________________________________________________________________

Maxima [C]  time = 3.10349, size = 165, normalized size = 2.23 \begin{align*} -\frac{2 \, b d x \cos \left (d x + c\right ) +{\left ({\left (a{\left (-i \, \Gamma \left (-2, i \, d x\right ) + i \, \Gamma \left (-2, -i \, d x\right )\right )} \cos \left (c\right ) - a{\left (\Gamma \left (-2, i \, d x\right ) + \Gamma \left (-2, -i \, d x\right )\right )} \sin \left (c\right )\right )} d^{4} +{\left (b{\left (2 i \, \Gamma \left (-2, i \, d x\right ) - 2 i \, \Gamma \left (-2, -i \, d x\right )\right )} \cos \left (c\right ) + 2 \, b{\left (\Gamma \left (-2, i \, d x\right ) + \Gamma \left (-2, -i \, d x\right )\right )} \sin \left (c\right )\right )} d^{2}\right )} x^{2} + 2 \, b \sin \left (d x + c\right )}{2 \, d^{2} x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*sin(d*x+c)/x^3,x, algorithm="maxima")

[Out]

-1/2*(2*b*d*x*cos(d*x + c) + ((a*(-I*gamma(-2, I*d*x) + I*gamma(-2, -I*d*x))*cos(c) - a*(gamma(-2, I*d*x) + ga
mma(-2, -I*d*x))*sin(c))*d^4 + (b*(2*I*gamma(-2, I*d*x) - 2*I*gamma(-2, -I*d*x))*cos(c) + 2*b*(gamma(-2, I*d*x
) + gamma(-2, -I*d*x))*sin(c))*d^2)*x^2 + 2*b*sin(d*x + c))/(d^2*x^2)

________________________________________________________________________________________

Fricas [A]  time = 1.64548, size = 250, normalized size = 3.38 \begin{align*} -\frac{2 \,{\left (a d^{2} - 2 \, b\right )} x^{2} \cos \left (c\right ) \operatorname{Si}\left (d x\right ) + 2 \, a d x \cos \left (d x + c\right ) + 2 \, a \sin \left (d x + c\right ) +{\left ({\left (a d^{2} - 2 \, b\right )} x^{2} \operatorname{Ci}\left (d x\right ) +{\left (a d^{2} - 2 \, b\right )} x^{2} \operatorname{Ci}\left (-d x\right )\right )} \sin \left (c\right )}{4 \, x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*sin(d*x+c)/x^3,x, algorithm="fricas")

[Out]

-1/4*(2*(a*d^2 - 2*b)*x^2*cos(c)*sin_integral(d*x) + 2*a*d*x*cos(d*x + c) + 2*a*sin(d*x + c) + ((a*d^2 - 2*b)*
x^2*cos_integral(d*x) + (a*d^2 - 2*b)*x^2*cos_integral(-d*x))*sin(c))/x^2

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b x^{2}\right ) \sin{\left (c + d x \right )}}{x^{3}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)*sin(d*x+c)/x**3,x)

[Out]

Integral((a + b*x**2)*sin(c + d*x)/x**3, x)

________________________________________________________________________________________

Giac [C]  time = 1.17029, size = 1034, normalized size = 13.97 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*sin(d*x+c)/x^3,x, algorithm="giac")

[Out]

1/4*(a*d^2*x^2*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 - a*d^2*x^2*imag_part(cos_integral(-d*
x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a*d^2*x^2*sin_integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*a*d^2*x^2*real
_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c) - 2*a*d^2*x^2*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2*
tan(1/2*c) - a*d^2*x^2*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2 + a*d^2*x^2*imag_part(cos_integral(-d*x))*t
an(1/2*d*x)^2 - 2*a*d^2*x^2*sin_integral(d*x)*tan(1/2*d*x)^2 + a*d^2*x^2*imag_part(cos_integral(d*x))*tan(1/2*
c)^2 - a*d^2*x^2*imag_part(cos_integral(-d*x))*tan(1/2*c)^2 + 2*a*d^2*x^2*sin_integral(d*x)*tan(1/2*c)^2 - 2*b
*x^2*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*b*x^2*imag_part(cos_integral(-d*x))*tan(1/2*
d*x)^2*tan(1/2*c)^2 - 4*b*x^2*sin_integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*a*d^2*x^2*real_part(cos_integr
al(d*x))*tan(1/2*c) - 2*a*d^2*x^2*real_part(cos_integral(-d*x))*tan(1/2*c) + 4*b*x^2*real_part(cos_integral(d*
x))*tan(1/2*d*x)^2*tan(1/2*c) + 4*b*x^2*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c) - 2*a*d*x*tan(
1/2*d*x)^2*tan(1/2*c)^2 - a*d^2*x^2*imag_part(cos_integral(d*x)) + a*d^2*x^2*imag_part(cos_integral(-d*x)) - 2
*a*d^2*x^2*sin_integral(d*x) + 2*b*x^2*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2 - 2*b*x^2*imag_part(cos_int
egral(-d*x))*tan(1/2*d*x)^2 + 4*b*x^2*sin_integral(d*x)*tan(1/2*d*x)^2 - 2*b*x^2*imag_part(cos_integral(d*x))*
tan(1/2*c)^2 + 2*b*x^2*imag_part(cos_integral(-d*x))*tan(1/2*c)^2 - 4*b*x^2*sin_integral(d*x)*tan(1/2*c)^2 + 2
*a*d*x*tan(1/2*d*x)^2 + 4*b*x^2*real_part(cos_integral(d*x))*tan(1/2*c) + 4*b*x^2*real_part(cos_integral(-d*x)
)*tan(1/2*c) + 8*a*d*x*tan(1/2*d*x)*tan(1/2*c) + 2*a*d*x*tan(1/2*c)^2 + 2*b*x^2*imag_part(cos_integral(d*x)) -
 2*b*x^2*imag_part(cos_integral(-d*x)) + 4*b*x^2*sin_integral(d*x) + 4*a*tan(1/2*d*x)^2*tan(1/2*c) + 4*a*tan(1
/2*d*x)*tan(1/2*c)^2 - 2*a*d*x - 4*a*tan(1/2*d*x) - 4*a*tan(1/2*c))/(x^2*tan(1/2*d*x)^2*tan(1/2*c)^2 + x^2*tan
(1/2*d*x)^2 + x^2*tan(1/2*c)^2 + x^2)